package Thread;

import java.sql.SQLOutput;
import java.util.Scanner;

public class Demo7 {
    public volatile static  int count = 0;
    public static void main(String[] args) {
        Thread t1 = new Thread(()-> {

            while(count == 0) {

            }
            System.out.println("t1执行结束");
        });
        Thread t2 = new Thread(()-> {
            Scanner scanner = new Scanner(System.in);
            count = scanner.nextInt();

        });


        t1.start();
        t2.start();
    }



}
